package www.admin.utils;

public enum ResultCode {

	  /* 成功状态码 */
    SUCCESS(1, null),
    /* 失败状态码 */
    FAILURE(2, null),
    /* 参数错误：10001-19999 */
    PARAM_IS_INVALID(10001, "参数无效"),
    PARAM_IS_BLANK(10002, "参数为空"),
    PARAM_TYPE_BIND_ERROR(10003, "参数类型错误"),
    PARAM_NOT_COMPLETE(10004, "参数缺失"),

    /* 用户错误：20001-29999*/
    USER_NOT_LOGGED_IN(20001, "用户未登录"),
    USER_LOGIN_ERROR(20002, "账号不存在或密码错误"),
    USER_ACCOUNT_FORBIDDEN(20003, "账号已被禁用"),
    USER_NOT_EXIST(20004, "用户不存在"),
    USER_HAS_EXISTED(20005, "用户已存在"),
    REG_PHONE_EXIST(20006, "手机号码已被注册"),
    VERIFICATION_INVALID(20007, "验证码无效"),
    PHONE_INVALID(20008, "手机号码无效"),
    KAOPU_ID_EXIST(20009, "该靠谱号已被使用"),
    EXIST_BIND_PHONE(200010, "必须存在一个绑定手机号码"),
    KAOPU_ID_BY_UPDATE(200011, "靠谱号只能修改一次"),
    USER_UP_PASSWD(200012, "修改失败"),
    USER_UP_MOBILE(200013, "更换失败"),
    /* 好友错误： 20101 ~ 20199*/
    NEW_FRIEND_ALREADY_FRIEND(20101, "已经是好友"),
    FRIEND_NOT_EXIT(20102, "好友不存在"),
    TRUSTED_USER_EXIST(20103, "已经是紧急联系人"),

    PROJECT_LIST_NOT_EXIST(30001, "清单数据不存在"),

    PROJECT_NOT_EXIST(30002, "清单数据不存在"),

    PROJECT_TASK_NOT_EXIST(30003, "清单任务不存在"),

    ACL_NOT_EXIST(30010, "权限不存在"),

    /* 标签错误： 30101 ~ 30199*/

    TAG_ADV_EXIST(30101, "标签名称已存在"),
    /* 系统错误：40001-49999 */
    SYSTEM_INNER_ERROR(40000, "系统繁忙，请稍后重试"),

    DATA_NOT_EXIST(40002, "数据不存在"),

    SYSTEM_UNAUTHORIZED(40001, "权限不足，禁止操作"),

    SYSTEM_FORBIDDEN(40003, "禁止操作"),

    SYSTEM_CONFLICT(40009, "数据版本冲突"),


    /* 授权类错误 40101~40199 */
    AUTH_TOKEN_CREATE_FAIL(40101, "TOKEN 创建失败"),

    AUTH_TOKEN_EXPIRED(40102, "账号已过期，请重新登录"),

    AUTH_TOKEN_PARSE_FAIL(40103, "TOKEN 解析失败"),

    /* 通知类错误：50001-59999*/
    SMS_SEND_FAIL(50001, "短信发送失败"),

    OSS_ERROR(50010, "对象存储错误"),
	
	/*新增对象失败*/
	INSERT_ERROR(50000,"新增对象失败");

    private int code;

    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int code() {
        return code;
    }

    public String msg() {
        return msg;
    }
}
